import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import {resolve} from 'path'
import vueJsxPlugin from "@vitejs/plugin-vue-jsx";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue(), vueJsxPlugin()],
  resolve: {
    alias: {
      '@': resolve(__dirname, "./src"),
    }
  },
  server: {
    port: 9001,
    proxy: {
      '/api': {
        target: 'http://localhost:8080',
        timeout: 5000,
        rewrite: path => path.replace(/^\/api/, ''),
      }
    }
  }
})
